package game.editer;

import hx.layout.AnchorLayoutData;
import game.editer.ui.Config;
import hx.display.Label;

/**
 * 通用的消息窗口
 */
class MessageView extends BaseView {
	public static function show(title:String, message:String):Void {
		var view:MessageView = new MessageView(title, message);
		view.topView.addChild(view);
	}

	public function new(title:String, message:String):Void {
		super(title, 400, 300);
		var m = new Label(message, Config.COMMON_TEXT_FORMAT);
		this.body.addChild(m);
		m.layoutData = AnchorLayoutData.center();
	}
}
